define(function(require,exports,module){
	

	$("#resetEmailCode").click(function(){
		var that = $(this)
		var setUrl = "/user/getPwdCode.html?email=" + $('input[name="email"]').val() + "&randomTime=" + (new Date()).getTime();
		var dataTime = 60;
		var Timer;
		$.ajax({
			url:setUrl,
			type:"post",
			success:function(data){
				if(data.result==true)
				{
					Timer = setInterval(function(){
						dataTime--;
						if(dataTime>0)
						{
							that.val(dataTime+"秒后重新发送").attr("disabled","disabled");
						}
						else{
							clearInterval(Timer);
							that.val("点击重新发送").removeAttr("disabled");
						}
					},1000)
				}
			}
		})
	})
		
	
})

